package com.alibaba.sentinelannotation;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import lombok.extern.slf4j.Slf4j;

/**
 * @author YL
 * @date 22:36 2021/10/8
 */
@Slf4j
public class BlockHandlerClassException {

    public static String block(String productId, String key, BlockException ex){
        log.warn("productId={}：热点数据被限流或者降级了 err={}",productId,ex.getMessage());
        return productId+"：热点数据被限流或者降级了";
    }
}
